local opt = vim.opt

-- 行号
opt.relativenumber = true
opt.number = true
-- 设置<ESC>键响应时间
opt.ttimeoutlen=0       

-- 缩进及排版
opt.tabstop = 4
opt.shiftwidth = 4
opt.expandtab = true
opt.autoindent = true
-- opt.backspace=2          -- 使用回车键正常处理indent,eol,start等
-- opt.sidescroll=10        -- 设置向右滚动字符数
--opt.nofoldenable         -- 禁用折叠代码
opt.foldmethod='indent'   -- 缩进为依据进行折叠
opt.foldlevel=99          -- 防止代码自动折叠

-- 防止包裹
opt.wrap = false

-- 光标行
opt.cursorline = true

-- 启用鼠标
opt.mouse:append("a")

-- 系统剪切板
-- opt.clipboard:append("unnamedplus")

-- 默认窗口右和下
opt.splitright = true
opt.splitbelow = true

-- 搜索
opt.ignorecase = true
opt.smartcase = true
opt.autowrite = true

-- 外观
opt.termguicolors = true
opt.signcolumn = "yes"
vim.cmd[[colorscheme tokyonight-moon]]


-- coc-nvim
-- Some servers have issues with backup files, see #649
-- Some servers have issues with backup files, see #649
vim.opt.backup = false
vim.opt.writebackup = false

-- Having longer updatetime (default is 4000 ms = 4s) leads to noticeable
-- delays and poor user experience
vim.opt.updatetime = 300

-- Always show the signcolumn, otherwise it would shift the text each time
-- diagnostics appeared/became resolved
vim.opt.signcolumn = "yes"
